package me.firstapp.module.system;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import me.firstapp.module.base.CommonEntity;

@Entity
@Table(name = "SYSTEM_OPERATOR")
public class Operator extends CommonEntity {

	private static final long serialVersionUID = 5239436575234231810L;

	// 邮箱
	@Column(name = "EMAIL", length = 100, unique = true, nullable = false)
	private String email;

	// 密码
	@Column(name = "PASSWORD", length = 100, nullable = false)
	private String password;

	// 用户名
	@Column(name = "NAME", length = 20, nullable = false)
	private String name;

	// 状态，0禁用，1启用
	@Column(name = "STATUS", columnDefinition = "TINYINT DEFAULT 0", nullable = false)
	private Integer status;

	// 登录次数
	@Column(name = "LOGIN_COUNTS", nullable = false)
	private Long loginCounts = 0L;

	// 上次登录ip
	@Column(name = "LAST_LOGIN_IP", length = 100)
	private String lastLoginIP;

	// 上次登录时间
	@Column(name = "LAST_LOGIN_TIME", columnDefinition = "DATETIME")
	private Date lastLoginTime;

	// 本次登录IP
	@Column(name = "NOW_LOGIN_IP", length = 100)
	private String nowLoginIP;

	// 本次登录时间
	@Column(name = "NOW_LOGIN_TIME", columnDefinition = "DATETIME")
	private Date nowLoginTime;

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Long getLoginCounts() {
		return loginCounts;
	}

	public void setLoginCounts(Long loginCounts) {
		this.loginCounts = loginCounts;
	}

	public String getLastLoginIP() {
		return lastLoginIP;
	}

	public void setLastLoginIP(String lastLoginIP) {
		this.lastLoginIP = lastLoginIP;
	}

	public Date getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(Date lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public String getNowLoginIP() {
		return nowLoginIP;
	}

	public void setNowLoginIP(String nowLoginIP) {
		this.nowLoginIP = nowLoginIP;
	}

	public Date getNowLoginTime() {
		return nowLoginTime;
	}

	public void setNowLoginTime(Date nowLoginTime) {
		this.nowLoginTime = nowLoginTime;
	}
}
